<?php
namespace Controller;

use Hoa\Registry\Registry;
use Illuminate\Support\Facades\Config;


/**
 * BaseController
 * @author los_gsy
 */
class BaseController {
	static public $table = 'base';


	/**
	 * 构造函数
	 */
	public function __construct() {
	}


	/**
	 * test
	 */
	public function test() {
		echo __METHOD__;
	}


	/**
	 * tmp
	 */
	public function tmp() {
		//echo get_called_class();
		echo static::$table;
	}


	/**
	 * @param array $data
	 * ajax成功返回，json格式
	 */
	public function successJsonReturn($data = []) {
		$conf = Registry::get('conf');
		$ret = $conf['status'][200];
		$ret = array_merge($ret, $data);
		exit(json_encode($ret));
	}


}